<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组</title>
    <script type="text/javascript">
        // 创建数组对象
        var arr = new Array();

        // 向数组中添加元素
        arr[0] = 10;

        var arr1 = [];

        // 数组的遍历
        var people = ["孙悟空", "猪八戒", "沙和尚", "唐三藏"];
        for(var i = 0; i < people.length; i++) {
            console.log(people[i]);
        }


    </script>


</head>

<body>

</body>

</html>